package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: Administrator
 * \* Date: 2022/8/1
 * \* Time: 19:34
 * \* To change this template use File | Settings | File Templates.
 * \* Description:
 * \
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/sayhi")
    public String sayHi(){
        System.out.println("sayhi方法被执行了");
        return "你好，世界！";
    }

    @RequestMapping("/sayhello")
    public String sayHello(){
        System.out.println("sayHello方法被执行了");

        return "世界，你好！";
    }
}
